# -*- coding: utf-8 -*-

"""
DateTime   : 2021/02/14 22:27
Author     : ZhangYafei
Description: 
"""
import requests

headers = {
    'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Mobile Safari/537.36'
}

requests.get('http://www.httpbin.org/cookies/set/number/123456789', headers=headers)
response = requests.get('http://www.httpbin.org/cookies', headers=headers)
print(response.text)

s = requests.Session()
s.get('http://www.httpbin.org/cookies/set/number/123456789', headers=headers)
response = s.get('http://www.httpbin.org/cookies')
print(response.text)